/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package suministros.ejb30.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Diana
 */
@Embeddable
public class StockAlmacenPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "ID_Suministro")
    private String iDSuministro;
    @Basic(optional = false)
    @Column(name = "id_subalmacen")
    private String idSubalmacen;

    public StockAlmacenPK() {
    }

    public StockAlmacenPK(String iDSuministro, String idSubalmacen) {
        this.iDSuministro = iDSuministro;
        this.idSubalmacen = idSubalmacen;
    }

    public String getIDSuministro() {
        return iDSuministro;
    }

    public void setIDSuministro(String iDSuministro) {
        this.iDSuministro = iDSuministro;
    }

    public String getIdSubalmacen() {
        return idSubalmacen;
    }

    public void setIdSubalmacen(String idSubalmacen) {
        this.idSubalmacen = idSubalmacen;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (iDSuministro != null ? iDSuministro.hashCode() : 0);
        hash += (idSubalmacen != null ? idSubalmacen.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {

        if (!(object instanceof StockAlmacenPK)) {
            return false;
        }
        StockAlmacenPK other = (StockAlmacenPK) object;
        if ((this.iDSuministro == null && other.iDSuministro != null) || (this.iDSuministro != null && !this.iDSuministro.equals(other.iDSuministro))) {
            return false;
        }
        if ((this.idSubalmacen == null && other.idSubalmacen != null) || (this.idSubalmacen != null && !this.idSubalmacen.equals(other.idSubalmacen))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "suministros.ejb30.entity.StockAlmacenPK[iDSuministro=" + iDSuministro + ", idSubalmacen=" + idSubalmacen + "]";
    }

}
